package com.yy.druid.controller;

import com.yy.druid.service.UserService;
import com.yy.druid.vo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author yangyao
 * @Description: UserController
 * @date 2018/10/8 09:44
 */
@RestController
@RequestMapping(value = "/api/users")
public class UserController {

    @Autowired
    private UserService userService;

    @GetMapping(value = "/")
    public List<User> getUsers(){
        return userService.getUserList();
    }
}
